Script for splitting objects with multiple shalls

I have heard of a script that would do this, but I have not seen it here or on the old Telelogic Forums. Was wondering if anyone knew about or had posession.

basically, the script would split objects automatically if there were more than one shall contained in the object and place new object after with rest of text, then keep looping for any multiple shalls.

Rich
richmason - Wed Mar 04 11:22:11 EST 2009

Re: Script for splitting objects with multiple shalls
llandale - Wed Mar 04 14:22:15 EST 2009

Sounds tough to automatically split an object text based on Shalls. Trust me, there is no way to accurately predict all the ways sloppy Word specifications can get written vis-a-vis multiple shalls. Good luck figuring this 'requirement' out using your head, let alone doing it with DXL:

"The system shall respond to A by doing X, and shall do Y, but shall not do Z. When A and B occurs the system shall not do Y, but when only B occurs the system will do C as per the following table <... table here...>; and shall then do D."

I would NEVER have such an auto script to drastically modify Object Text and create objects; but would consider doing this: have an interactive script that finds the next qualifying object (one with two shalls in two different sentences), displays how the script wants to do the split, and responds to an apply button to actually do the split, create the next object etc, then proceed to the next object that seems to qualify.

If the script wants to split the script inappropriately, the user would manually split this object the 'right' way, and reset the dialog.

The following ideas should apply:
We need to search RAW text, yet copy/cut/paste the equivalent ..err.. corresponding rich text. That's tricky.
We need to recognize sentences and know exactly where in the text that sentence starts and ends. A 'sentence' can start at the start of the Text or after the end of the previous sentence, including white space. A 'sentence' ends with certain punctuation, .?!, or at the end of the Text.
The script looks at each separate sentence of the text, and knows if it contains 'shall', including 'Shall' and 'SHALL', but excluding "shall" in quote marks.
Each sentence is examined. If a second 'shall' sentence is encountered then a desired split is recommended at the point right before the start of the second shall sentence. The 2nd shall sentence and everything after will go into the newly created object 'after' the first one.
It doesn't matter if there are 3 or more 'shall' sentences; as the additional ones would be split into the new object, and that new object would be parsed as the 'next' object after splitting the current one.
The script would recognize a single sentence with more than one 'shall', bring it to the user's attention and stop at that object, but make no effort and recommending a good 'split' point.

Gads, good luck.

  • Louie

Re: Script for splitting objects with multiple shalls
SystemAdmin - Wed Mar 04 16:45:22 EST 2009

Hi Rich,

I was faced with a problem like this not so long ago - I thought about a script to help, but then I had a good lie down and waited for the thought to go away because there are too many exceptions to try and cater for.

I'm afraid that this is something where good old humanware needs to be applied as this is a major alteration to a specification that I would not leave up to a script. On the up side, there is a tool within DOORS that can help with the humanware approach - use the Split Object Text tool to help you carve out each "Shall" statement and put them into a new object - this can be found in the Module menu under Tools > Functions > Split Object Text.


Paul Miller
Specification Practices Specialist
EuroCyber
Melbourne, Australia

Re: Script for splitting objects with multiple shalls
richmason - Thu Mar 05 08:17:58 EST 2009

SystemAdmin - Wed Mar 04 16:45:22 EST 2009
Hi Rich,

I was faced with a problem like this not so long ago - I thought about a script to help, but then I had a good lie down and waited for the thought to go away because there are too many exceptions to try and cater for.

I'm afraid that this is something where good old humanware needs to be applied as this is a major alteration to a specification that I would not leave up to a script. On the up side, there is a tool within DOORS that can help with the humanware approach - use the Split Object Text tool to help you carve out each "Shall" statement and put them into a new object - this can be found in the Module menu under Tools > Functions > Split Object Text.


Paul Miller
Specification Practices Specialist
EuroCyber
Melbourne, Australia

ya, you guys are right, it would be painful. but it's painful anyway when I have to bring in untold numbers of existing specs from word where whole paragraphs come in as one object and then have to be manually split to break up the shalls for traceability purposes.

Re: Script for splitting objects with multiple shalls
llandale - Thu Mar 05 10:37:56 EST 2009

richmason - Thu Mar 05 08:17:58 EST 2009
ya, you guys are right, it would be painful. but it's painful anyway when I have to bring in untold numbers of existing specs from word where whole paragraphs come in as one object and then have to be manually split to break up the shalls for traceability purposes.

You need to manipulate the original Word specs to make them importable anyway, so perhaps this work can best be done in Word before importing; where its easier to simply add a EOL where you want it.

>Louie